package com.ruoyi.system.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.AppDynamicMsg;
import com.ruoyi.system.mapper.AppDynamicMsgMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AppFunctionConfigurationMapper;
import com.ruoyi.system.domain.AppFunctionConfiguration;
import com.ruoyi.system.service.IAppFunctionConfigurationService;

/**
 * 功能配置Service业务层处理
 *
 * @author ruoyi
 * @date 2023-03-08
 */
@Service
public class AppFunctionConfigurationServiceImpl extends ServiceImpl<AppFunctionConfigurationMapper, AppFunctionConfiguration> implements IAppFunctionConfigurationService {
    @Autowired
    private AppFunctionConfigurationMapper appFunctionConfigurationMapper;

    /**
     * 查询功能配置
     *
     * @param id 功能配置主键
     * @return 功能配置
     */
    @Override
    public AppFunctionConfiguration selectAppFunctionConfigurationById(Long id) {
        return appFunctionConfigurationMapper.selectAppFunctionConfigurationById(id);
    }

    /**
     * 查询功能配置列表
     *
     * @param appFunctionConfiguration 功能配置
     * @return 功能配置
     */
    @Override
    public List<AppFunctionConfiguration> selectAppFunctionConfigurationList(AppFunctionConfiguration appFunctionConfiguration) {
        return appFunctionConfigurationMapper.selectAppFunctionConfigurationList(appFunctionConfiguration);
    }

    /**
     * 新增功能配置
     *
     * @param appFunctionConfiguration 功能配置
     * @return 结果
     */
    @Override
    public int insertAppFunctionConfiguration(AppFunctionConfiguration appFunctionConfiguration) {
        appFunctionConfiguration.setCreateTime(DateUtils.getNowDate());
        return appFunctionConfigurationMapper.insertAppFunctionConfiguration(appFunctionConfiguration);
    }

    /**
     * 修改功能配置
     *
     * @param appFunctionConfiguration 功能配置
     * @return 结果
     */
    @Override
    public int updateAppFunctionConfiguration(AppFunctionConfiguration appFunctionConfiguration) {
        appFunctionConfiguration.setUpdateTime(DateUtils.getNowDate());
        return appFunctionConfigurationMapper.updateAppFunctionConfiguration(appFunctionConfiguration);
    }

    /**
     * 批量删除功能配置
     *
     * @param ids 需要删除的功能配置主键
     * @return 结果
     */
    @Override
    public int deleteAppFunctionConfigurationByIds(Long[] ids) {
        return appFunctionConfigurationMapper.deleteAppFunctionConfigurationByIds(ids);
    }

    /**
     * 删除功能配置信息
     *
     * @param id 功能配置主键
     * @return 结果
     */
    @Override
    public int deleteAppFunctionConfigurationById(Long id) {
        return appFunctionConfigurationMapper.deleteAppFunctionConfigurationById(id);
    }
}
